home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Unix / Piper / SampleScripts / ExamineTar(Z) / script < prev   
Text File  |  1993-01-25  |  491b  |  13 lines

  1. #!/bin/csh
  2. if ! -f "$1" then
  3.     echo ExamineTar\(Z\): I can only examine files! > /dev/console
  4.     exit(-1)
  5.   else if "$1" =~ *.tar.Z then
  6.     ( echo It is a tarred and compressed directory with the following contents: ; zcat "$1" | tar tf - ) | open
  7.   else if "$1" =~ *.tar then
  8.     ( echo It is a tarred directory with the following contents: ; cat "$1" | tar tf - ) | open
  9.   else
  10.     echo ExamineTar\(Z\): You gave me a file with the wrong extension! > /dev/console
  11.     exit(-1)
  12.   endif
  13.